/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

/**
 *
 * @author Annette
 */
public class Shipment {

    private int id;
    private String date;
    private boolean dangerousGoods;
    private int goodsType;
    private int weight;
    private int amount;
    private String comment;
    private String customer;
    private String startAddress;
    private String endAddress;
    private Route route;
    private Truck truck;
    private Driver driver;

    public Shipment(int amount, String date, boolean dangerousGoods, int goodsType, int weight, String comment, String customer, String startAdress, String finishAdress, Truck truck, Driver driver, Route route) {
        this.amount = amount;
        this.date = date;
        this.dangerousGoods = dangerousGoods;
        this.goodsType = goodsType;
        this.weight = weight;
        this.comment = comment;
        this.customer = customer;
        this.startAddress = startAdress;
        this.endAddress = finishAdress;
        this.route = route;
        this.truck = truck;
        this.driver = driver;
    }

    public int getId() {
        return id;
    }

    public int calculateGoods() throws Exception {
        return 0;
    }

    public int getPickUpCityID() {
        return route.getPickUpCity().getId();
    }

    public int getDeliveryCityID() {
        return route.getDeliveryCity().getId();
    }

    public String getStartAddress() {
        return startAddress;
    }

    public void setStartAddress(String startAddress) {
        this.startAddress = startAddress;
    }

    public String getEndAddress() {
        return endAddress;
    }

    public void setEndAddress(String endAddress) {
        this.endAddress = endAddress;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public boolean isDangerousGoods() {
        return dangerousGoods;
    }

    public void setDangerousGoods(boolean dangerousGoods) {
        this.dangerousGoods = dangerousGoods;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getStartAdress() {
        return startAddress;
    }

    public void setStartAdress(String startAdress) {
        this.startAddress = startAdress;
    }

    public String getFinishAdress() {
        return endAddress;
    }

    public void setFinishAdress(String finishAdress) {
        this.endAddress = finishAdress;
    }

    public int getKm() {
        return route.getKm();
    }

    public void setRoute(Route r) {
        route = r;
    }

    public int getGoodsType() {
        return goodsType;
    }

    public void setGoodsType(int goodsType) {
        this.goodsType = goodsType;
    }

    public int getAmount() {
        return amount;
    }

    public String getCustomer() {
        return customer;
    }

    public Truck getTruck() {
        return truck;
    }

    public void setTruck(Truck truck) {
        this.truck = truck;
    }

    public Driver getDriver() {
        return driver;
    }

    public void setDriver(Driver driver) {
        this.driver = driver;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

    public void setCustomer(String customer) {
        this.customer = customer;
    }

    public Route getRoute() {
        return route;
    }

}
